package com.cloudpivot.receivales.ding.scenegroup.domain;

import com.cloudpivot.receivales.ding.scenegroup.view.RspEnum;
import lombok.Data;

import java.util.Map;

/**
 * 返回信息
 * code=状态 -100--dinguser异常  -10000 catch 报错 -99--创建场景群失败   -101--crm任务记录异常
 *
 * msg=提示
 *
 * data =具体的返回值
 */
@Data
public class RspDTO {
    private Integer code;
    private String msg;
    private Map<String,Object> data;

    public RspDTO(Integer code,  Map<String, Object> data) {
        this.code=code;
        this.msg=RspEnum.getValue(code);
        this.data=data;
    }

    public RspDTO(Integer code, String msg) {
        this.code=code;
        this.msg=msg;
        this.data=null;
    }

    public RspDTO(Integer code) {
        this.code= code;
        this.msg=RspEnum.getValue(code);
        this.data=null;
    }

}
